package com.ccod.mapper.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author: ccod
 * @data: 2020/12/5 16:24
 **/
@ConfigurationProperties(value = MapperRefreshProperties.MAPPER_REFRESH_PREFIX)
public class MapperRefreshProperties {

    public static final String MAPPER_REFRESH_PREFIX = "mapper-refresh";

    private boolean enabledRefresh;

    private String[] mapperLocations;

    /**
     * 延迟加载时间
     */
    private int delaySeconds = 10;

    /**
     * 刷新间隔时间
     */
    private int sleepSeconds = 20;

    public boolean isEnabledRefresh() {
        return enabledRefresh;
    }

    public void setEnabledRefresh(boolean enabledRefresh) {
        this.enabledRefresh = enabledRefresh;
    }

    public String[] getMapperLocations() {
        return mapperLocations;
    }

    public void setMapperLocations(String[] mapperLocations) {
        this.mapperLocations = mapperLocations;
    }

    public int getDelaySeconds() {
        return delaySeconds;
    }

    public void setDelaySeconds(int delaySeconds) {
        this.delaySeconds = delaySeconds;
    }

    public int getSleepSeconds() {
        return sleepSeconds;
    }

    public void setSleepSeconds(int sleepSeconds) {
        this.sleepSeconds = sleepSeconds;
    }
}
